<html>
<head>
<title>Tutorial 1 Stage 1 - Creating a basic report</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td width="100%">
			<table width="100%" height="78" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" id="topnav">
			<tr>
				<!-- Header Side -->
				<td width="17">
					<img height="78" src="media/reportico100.png"/>
				</td>
				<td align="right"></td>
				<td align="center">
					<table width="100%" height="60" border="0" align="left" cellpadding="0" cellspacing="0">
						<tr>
							<td valign="top" align="left">
							<img src="media/repbanner.png"/></td>
							</td>
						</tr>
						<tr>
							<td align="center" valign="bottom" class="topmenucell">
								<nobr>
								&nbsp;
								</nobr>
							</td>
						</tr>
					</table>
				</td>
				<td width="103" class="toplogincell">
					&nbsp;
				</td>
			</tr>
			</table>
</td>
  </tr>
  <!--tr>
    <td class="header_top">reportico</td>
  </tr-->
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_reportico.html" class="menu">class tree: reportico</a> ]
		  [ <a href="../elementindex_reportico.html" class="menu">index: reportico</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_reportico.html">reportico</a><br />
            <br /><br />
		<b>Tutorials/Manuals:</b><br />
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.pkg.html">Reportico Tutorial And User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.manual.pkg.html">Reportico User Manual</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.quickstart.pkg.html">Reportico Installation</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.gettingstarted.pkg.html">Getting Started</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.structure.pkg.html">Reportico Installation Structure</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.using.pkg.html">Configuring Reportico - System Parameters</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.embedding.pkg.html">Embedding Reportico</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.security.pkg.html">Reportico Security</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.language.pkg.html">Language Support</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.projects.pkg.html">Projects</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.importlink.pkg.html">Importing and linking from reports</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.menus.pkg.html">Report Menus</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.prepare.pkg.html">Report Preparation and Execution</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.design.pkg.html">Report Design Mode</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.format.pkg.html">The Design Format Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.customcode.pkg.html">Custom Source Code</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.qrydet.pkg.html">The Query Details Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.assign.pkg.html">The Assignments Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.criteria.pkg.html">The Criteria Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.output.pkg.html">The Output Menu</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.webservices.pkg.html">Turning Reports into Web Services (currently unavailable)</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.faq.pkg.html">Reportico FAQ</a>
</ul>
</li></ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.howto.pkg.html">Reportico Tutorial</a>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1.pkg.html">Tutorial No.1 - The Film Listing Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_1.pkg.html">Tutorial 1 Stage 1 - Creating a basic report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_2.pkg.html">Tutorial 1 Stage 2 - Creating User Entry Criteria</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_3.pkg.html">Tutorial 1 Stage 3 - Working with expressions using assignments</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_4.pkg.html">Tutorial 1 Stage 4 - Working with groups</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial1_5.pkg.html">Tutorial 1 Stage 5 - Including database graphics into the report and generating drilldowns</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial2_1.pkg.html">Tutorial 2 - Creating the loan history report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial3_1.pkg.html">Tutorial 3 - The Monthly Returns Report</a>
</ul>
<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.tutorial4_1.pkg.html">Tutorial 4 - The Late Returns Summary report</a>
</ul>
</li></ul>
</li></ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix1.pkg.html">Appendix 1 - Reportico Project Configuration parameters</a>
</ul>

							<ul>
	<li type="square"><a href="../reportico/tutorial_reportico.appendix2.pkg.html">Appendix 2 - Reportico URL request parameters</a>
</ul>

									                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../reportico/_reportico.php.html">		reportico.php
		</a><br>
	  </div><br />
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"../reportico/tutorial_reportico.tutorial1.pkg.html">Prev</a></td>
<td width="80%" align="center" valign="bottom"></td>
<td width="10%" align="right" valign="bottom"><a href=
"../reportico/tutorial_reportico.tutorial1_2.pkg.html">Next</a></td>
</tr>
</table>
<span><a name=""></a><h2 class="title">Tutorial 1 Stage 1 - Creating a basic report</h2><p>In this stage you will learn how to :-
	<ol><li><p>Create a new report</p></li>
	<li><p>Enter report design mode</p></li>
	<li><p>Set the  report title and description</p></li>
	<li><p>Enter the report data access query</p></li>
	<li><p>Set report column labels and formatting</p></li></ol></p>
   <a name="tut1_1_run"></a><h3 class="title">Beginning the Tutorial 1 Stage 1 Report</h3><p>Select <strong>Film Listing - Tutorial 1 Stage 1</strong> from the tutorials menu (Alternatively you can point your browser at the URL <strong>http://{SERVER_ADDRESS}/{REPORTICO_INSTALL_DIRECTORY}/run.php?project=tutorials&amp;execute_mode=PREPARE&amp;xmlin=tut1_1_films.xml</strong>). You should now enter a pretty empty report front end screen with a title of <strong>Set Report Title</strong>. You are now ready to start the first stage of building a basic report.</p><hr />
   <a name="tut1_1_design"></a><h3 class="title">Enter report design mode</h3><p>In order to access the report configuration screens,  click on the <strong>Design Report</strong> button. You should then see the design screen with selection tabs Format, Query details, Assignments, Criteria and Output.</p>
<p>Press the <strong>New Report</strong> button. Nothing really seems to happen, but if you were editing a completed report then this button would start from scratch again.</p><hr />
   <a name="tut1_1_reporttitle"></a><h3 class="title">Set the report title</h3><p>The first configuration task to do is to set the report title by selecting the <strong>Format</strong> tab and locating the <strong class = "italic">Report Title</strong> parameter. Enter the Report Title, say <strong class = "underline">Film List</strong>. Then click in the <strong>Report Description</strong> text box and enter a free text description. Now save your entry by pressing the small <strong>Ok</strong> button on the right hand side of the format parameters. Every time one or more entries are made on a single screen, the appropriate <strong>Ok</strong> button must be pressed for them to be saved.</p>
   <p>You will now see the correct report title displayed at the top of the screen. Now return to the report entry screen by selecting the <strong>Execute</strong> option from the <strong>Mode</strong> drop down list box. You should also see your text description on the right hand side. A report description can tell users what the report shows and how best to run it.</p><hr />
   <a name="tut1_1_query"></a><h3 class="title">Enter the report data access query</h3><p>Now return to <strong>Design</strong> mode to enter the query. Select the <strong>Query Details</strong> tab. You are presented with the <strong>SQL</strong> submenu tab which will contain a dummy query. Enter into this box the following query replacing what is already there and press then press the <strong>Ok</strong> button:
<pre>
SELECT film.film_id, film.title, category.cat_desc, country.country_name 
FROM reptut_film film, reptut_country country, reptut_category category 
WHERE 1 = 1 AND film.cat_code = category.cat_code
AND film.country_code = country.country_code  
ORDER BY  country.country_name, title
</pre></p>
   <p>If no error is reported then the query has been accepted. Note that afterwards the query has been slightly modified. Each column is now qualified with a name ( for example you entered film.film_id and the query is now showing <strong>film.film_id film_id</strong>). Also the ORDER BY section has been modified to include the ASC operator to imply ascending order.</p>
   <p>Before continuing to the next section you may wish to try the report as it is. Select <strong>Execute</strong> mode and when you return to the Execute screen press the <strong>Execute</strong> button. You should see the report data. You will notice that the column headings are the names of the database columns. We will change these in the next stage. Return to <strong>Design</strong> mode before continuing.</p><hr />
   <a name="tut1_1_labels"></a><h3 class="title">Set report column labels and formatting</h3><p>Enter <strong>Design</strong> mode and select the <strong>Query Details</strong> tab. Then select the <strong>Query Columns</strong> sub-tab. You will see the list of data columns relating to the query you have entered. You will now set the column label of the <strong>cat_desc</strong> column.  Click on the  <strong>cat_desc</strong> column and you will see the column parameters. Locate the  <strong>Column Title</strong> field and enter the text  <strong>Category</strong> and then press the second <strong>Ok</strong> button. You can do this if you wish for each column, capitalizing and altering the column label text. We will now make the  <strong>film_id</strong> column right-justified. Select the <strong>film_id</strong> column, locate the  <strong>Justification</strong> parameter and change it to  <strong>right</strong>.</p><hr />
   <a name="tut1_1_check"></a><h3 class="title">Checking Your Report</h3><p>Now return to execute mode and run the report. You will notice your column labels have improved and the Film Id column is right justified.</p><hr /></span>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="../reportico/tutorial_reportico.tutorial1.pkg.html">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"../reportico/tutorial_reportico.howto.pkg.html">Up</a></td>
<td width="33%" align="right" valign="top"><a href=
"../reportico/tutorial_reportico.tutorial1_2.pkg.html">Next</a></td>
</tr>

<tr>
<td width="33%" align="left" valign="top">Tutorial No.1 - The Film Listing Report</td>
<td width="34%" align="center" valign="top">Reportico Tutorial</td>
<td width="33%" align="right" valign="top">Tutorial 1 Stage 2 - Creating User Entry Criteria</td>
</tr>
</table>
        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 09 Jun 2014 18:10:08 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>